package net.huashitong.supervision.task.service;

import com.sirdc.modules.core.dao.BaseDao;
import com.sirdc.modules.sys.base.StringPKService;
import net.huashitong.supervision.task.dao.TaskPermissionsDao;
import net.huashitong.supervision.task.entity.TaskPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TaskPermissionService extends StringPKService<TaskPermissions> {
    @Autowired
    private TaskPermissionsDao dao;
    @Override
    protected BaseDao<TaskPermissions, String> getDao() {
        return dao;
    }

    public TaskPermissions getPer(String userId,int type)
    {
        return dao.getPermission(userId, type);
    }

    /**
     *  获取单位下自定义的领导
     * @param deptId
     * @param type
     * @return
     */
    public List<TaskPermissions> getListLeader(String deptId,int type){
        return dao.getListLeader(deptId, type);
    }
}
